<template>
<div class="container">
  <div class="container-view" id="report">   
    <!-- pdf导出的内容 -->
    <div class="view-header">
      <img class="view-header-img" src="https://ym.geowin100.com/files/2024/66b9ceed48ebc1723453165.png" alt="">
    </div>
    <div class="view-school">
      <div class="school-list">
        <div class="list-view">
          <div class="list-view-qs">QS 77</div>
          <div class="list-view-left">
            <img class="list-view-img" src="https://ym.geowin100.com/files/2024/66b9d4d54213b1723454677.png" alt="">
            <div class="list-view-name">
              <div class="view-name-title1">牛津大学</div>
              <div class="view-name-title2">专业：信息技术硕士</div>
            </div>
          </div>
          <div class="list-view-border">
            <div class="view-border-title">雅思： 总分6.5  小分6</div>
            <div class="view-border-rtitle">$<span class="num-title">46600</span></div>
          </div>
        </div>
        <div class="list-view">
          <div class="list-view-qs">QS 77</div>
          <div class="list-view-left">
            <img class="list-view-img" src="https://ym.geowin100.com/files/2024/66b9d4d54213b1723454677.png" alt="">
            <div class="list-view-name">
              <div class="view-name-title1">牛津大学</div>
              <div class="view-name-title2">专业：信息技术硕士</div>
            </div>
          </div>
          <div class="list-view-border">
            <div class="view-border-title">雅思： 总分6.5  小分6</div>
            <div class="view-border-rtitle">$<span class="num-title">46600</span></div>
          </div>
        </div>
        <div class="list-view">
          <div class="list-view-qs">QS 77</div>
          <div class="list-view-left">
            <img class="list-view-img" src="https://ym.geowin100.com/files/2024/66b9d4d54213b1723454677.png" alt="">
            <div class="list-view-name">
              <div class="view-name-title1">牛津大学</div>
              <div class="view-name-title2">专业：信息技术硕士</div>
            </div>
          </div>
          <div class="list-view-border">
            <div class="view-border-title">雅思： 总分6.5  小分6</div>
            <div class="view-border-rtitle">$<span class="num-title">46600</span></div>
          </div>
        </div>
      </div>
    </div>
    <div class="view-title">
      <div class="view-title1">
        <img class="view-title1-img" src="https://ym.geowin100.com/files/2024/66bb2a04ee1b51723542020.png" alt="">
      </div>
      <div class="view-title2">方案1</div>
    </div>
    <div class="view-school">
      <div class="view-school-rank">QS 77</div>
      <div class="view-school-header">
        <img class="school-header-img" src="https://ym.geowin100.com/files/2024/66b9d4d54213b1723454677.png" alt="">
        <div class="school-header-title1">西澳大学</div>
        <div class="school-header-title2">信息技术硕士</div>
        <div class="school-header-title3">Master of Informatio</div>
      </div>
      <div class="view-school-info">
        <div class="school-info-title">专业介绍</div>
        <div class="school-info-line"></div>
        <div class="school-info-main" v-html="11"></div>
      </div>
    </div>
  </div>
  <div class="output" @click="printReport">导出此报告</div>
</div>
</template>

<script setup>
import htmlToPdf from "@/utils/htmlToPDF"
const printReport = (() => {
  htmlToPdf.getPdf('方案报告',"#report")
})
</script>

<style lang="scss" scoped>
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.view-header {
  text-align: center;
}
// 针对小屏幕设备（如手机）
@media screen and (max-width: 480px) {
  // 专业列表
  .container-view {
    background: #F6FEFF;
    padding: 16px;
  }
  .view-header-img {
    width: 134px;
    height: 22px;
  }
  .view-school {
    margin-top: 8px;
    padding: 7px;
    background: #FFFFFF;
    box-shadow: 0px 0 4px 0px #E9F2F4;
    border-radius: 3px;
    position: relative;
  }
  .school-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* 设置项目之间的间隔 */
    justify-content: space-between;
  }
  .list-view {
    width: 48%;
    box-sizing: border-box;
    padding: 3px;
    background: #EAF7FB;
    border-radius: 3px;
    position: relative;
  }
  .list-view-left {
    display: flex;
    align-content: center;
  }
  .list-view-img {
    width: 32px;
    height: 32px;
  }
  .list-view-name {
    margin-left: 3px;
    margin-top: 5px;
    text-align: start;
  }
  .view-name-title1 {
    font-weight: 500;
    font-size: 9px;
    color: #000000;
    line-height: 12px;
  }
  .view-name-title2 {
    font-weight: 400;
    font-size: 6px;
    color: #000000;
    line-height: 8px;
  }
  .list-view-border {
    display: flex;
    align-content: center;
    margin-left: 35px;
    justify-content: space-between;
    position: relative;
    top: -4px;
  }
  .view-border-title {
    background: #FFFFFF;
    border-radius: 5px;
    border: 0px solid #00AAA9;
    padding: 2px 6px;
    font-weight: 500;
    font-size: 5px;
    color: #00AAA9;
  }
  .view-border-rtitle {
    font-weight: 500;
    font-size: 6px;
    color: #FF3C3C;
    margin-right: 5px;
  }
  .num-title {
    font-size: 9px;
  }
  .list-view-qs {
    background: url('https://ym.geowin100.com/files/2024/66bab9ebe9a121723513323.png') no-repeat;
    background-size: 100% 100%;
    width: 31px;
    height: 15px;
    position: absolute;
    right: -5px;
    font-weight: 500;
    font-size: 7px;
    color: #FFFFFF;
    line-height: 12px;
  }
  // 专业详情
  .view-title {
    text-align: center;
    margin-top: 18px;
    position: relative;
  }
  .view-title1 {
    display: flex;
    align-content: center;
    justify-content: center;
  }
  .view-title1-img {
    width: 71px;
    height: 20px;
  }
  .view-title2 {
    font-family: PingFangSC, PingFang SC;
    font-weight: 600;
    font-size: 11px;
    color: #00AAA9;
    line-height: 15px;
  }
  .view-school-rank {
    background: url('https://ym.geowin100.com/files/2024/66bb04a51b9ae1723532453.png') no-repeat;
    background-size: 100% 100%;
    width: 21px;
    height: 18px;
    position: absolute;
    right: 7px;
    top: 0;
    font-weight: 500;
    font-size: 5px;
    color: #FFFFFF;
    line-height: 13px;
  }
  .view-school-header {
    text-align: center;
    margin-bottom: 19px;
  }
  .school-header-img {
    width: 27px;
    height: 27px;
  }
  .school-header-title1 {
    font-weight: 500;
    font-size: 8px;
    color: #000000;
    line-height: 11px;
  }
  .school-header-title2 {
    font-weight: 400;
    font-size: 5px;
    color: #000000;
    line-height: 7px;
  }
  .school-header-title3 {
    font-weight: 400;
    font-size: 5px;
    color: #000000;
    line-height: 7px;
  }
  .view-school-info {
    background: #EAF7FB;
    border-radius: 2px;
    padding: 5px 3px;
  }
  .school-info-title {
    font-weight: 600;
    font-size: 5px;
    color: #00AAA9;
    line-height: 7px;
    text-align: start;
  }
  .school-info-line {
    width: 22px;
    height: 1px;
    background: #00AAA9;
    border-radius: 1px;
  }
  .school-info-main {
    font-weight: 400;
    font-size: 5px;
    color: #000000;
    line-height: 6px;
    margin-top: 5px;
    text-align: start;
  }
}
/* 针对中等屏幕设备（如平板） */
@media (min-width: 481px) and (max-width: 1019px) {
  .container {
    width: 100%;
  }
  .container-view {
    padding: 22px;
    background: #F6FEFF;
  }
  .view-header-img {
    width: 177px;
    height: 30px;
  }
  .view-school {
    margin-top: 15px;
    padding: 10px;
    background: #FFFFFF;
    border-radius: 4px;
    position: relative;
  }
  .school-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* 设置项目之间的间隔 */
    justify-content: space-between;
  }
  .list-view {
    width: 48%;
    box-sizing: border-box;
    padding: 5px;
    background: #EAF7FB;
    border-radius: 4px;
    position: relative;
  }
  .list-view-left {
    display: flex;
    align-content: center;
  }
  .list-view-img {
    width: 60px;
    height: 60px;
  }
  .list-view-name {
    margin-left: 3px;
    margin-top: 10px;
    text-align: start;
  }
  .view-name-title1 {
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
    color: #000000;
  }
  .view-name-title2 {
    font-weight: 400;
    font-size: 11px;
    color: #000000;
    line-height: 15px;
  }
  .list-view-border {
    display: flex;
    margin-left: 65px;
    justify-content: space-between;
    position: relative;
    top: -14px;
    width: calc(100% - 65px);
  }
  .view-border-title {
    background: #FFFFFF;
    border-radius: 7px;
    border: 1px solid #00AAA9;
    padding: 3px 10px;
    font-weight: 500;
    font-size: 10px;
    color: #00AAA9;
  }
  .view-border-rtitle {
    font-weight: 500;
    font-size: 8px;
    color: #FF3C3C;
    margin-right: 5px;
  }
  .num-title {
    font-size: 11px;
  }
  .list-view-qs {
    background: url('https://ym.geowin100.com/files/2024/66bab9ebe9a121723513323.png') no-repeat;
    background-size: 100% 100%;
    width: 45px;
    height: 23px;
    position: absolute;
    right: -6px;
    font-weight: 500;
    font-size: 11px;
    color: #FFFFFF;
    line-height: 16px;
  }
}
// 针对大屏幕设备（如桌面电脑）
@media screen and (min-width: 1020px) {
  .container {
    width: 100%;
  }
  .container-view {
    background: #F6FEFF;
    padding: 50px;
  }
  .view-header-img {
    width: 430px;
    height: 71px;
  }
  .view-school {
    margin-top: 15px;
    padding: 22px 23px;
    background: #FFFFFF;
    box-shadow: 0px 2px 11px 0px #E9F2F4;
    border-radius: 10px;
    position: relative;
  }
  .school-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* 设置项目之间的间隔 */
    justify-content: space-between;
  }
  .list-view {
    width: 48%;
    box-sizing: border-box;
    padding: 10px;
    background: #EAF7FB;
    border-radius: 10px;
    position: relative;
  }
  .list-view-left {
    display: flex;
    align-content: center;
  }
  .list-view-img {
    width: 105px;
    height: 105px;
  }
  .list-view-name {
    margin-left: 3px;
    margin-top: 10px;
    text-align: start;
  }
  .view-name-title1 {
    font-weight: 500;
    font-size: 28px;
    line-height: 38px;
    color: #000000;
  }
  .view-name-title2 {
    font-weight: 400;
    font-size: 19px;
    color: #000000;
    line-height: 28px;
  }
  .list-view-border {
    display: flex;
    align-content: center;
    margin-left: 110px;
    justify-content: space-between;
    position: relative;
    top: -23px;
    width: calc(100% - 120px);
  }
  .view-border-title {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #00AAA9;
    padding: 6px 20px;
    font-weight: 500;
    font-size: 15px;
    color: #00AAA9;
  }
  .view-border-rtitle {
    font-weight: 500;
    font-size: 19px;
    color: #FF3C3C;
    margin-right: 5px;
  }
  .num-title {
    font-size: 28px;
  }
  .list-view-qs {
    background: url('https://ym.geowin100.com/files/2024/66bab9ebe9a121723513323.png') no-repeat;
    background-size: 100% 100%;
    width: 101px;
    height: 49px;
    position: absolute;
    right: -14px;
    font-weight: 500;
    font-size: 21px;
    color: #FFFFFF;
    line-height: 35px;
  }
}
.output {
  border: 1px solid #4a8cb3;
  color: rgb(235, 38, 64);
}
</style>